vnet: Fix build of the vnet module.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 27 Apr 2007 15:27:07 +0000 (16:27 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 27 Apr 2007 15:27:07 +0000 (16:27 +0100)
- correcting KERNEL_SRC ( ./build-linux... )
- typing errors in Makefile.ver
- module-params
Signed-off-by: Robert Valentan <R.Valentan@solid-soft.at>
tools/vnet/vnet-module/Makefile.ver
tools/vnet/vnet-module/varp.c
tools/vnet/vnet-module/vnet.c
tools/vnet/vnetd/Makefile
tools/vnet/vnetd/sys_kernel.h

index 2567f9242fbd7ccca9cd6d302e1921abbe3873ff..76382c2a320531505c1a64db9a3fdfe8e95aa08f 100644 (file)
 # 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
 #============================================================================
 
+include $(XEN_ROOT)/Config.mk
+
 LINUX_SERIES?=2.6
-KERNEL_MINOR=-xen
+ifeq ($(XEN_SPLIT_KERNEL),y)
+  KERNEL_MINOR=-xen0
+else
+  KERNEL_MINOR=-xen
+endif
 
 LINUX_VERSION?=$(shell (/bin/ls -d $(XEN_ROOT)/pristine-linux-$(LINUX_SERIES).* 2>/dev/null) | \
                       sed -e 's!^.*linux-\(.\+\)!\1!' )
@@ -30,7 +36,7 @@ endif
 
 KERNEL_VERSION=$(LINUX_VERSION)$(KERNEL_MINOR)
 
-KERNEL_SRC?=$(shell cd $(XEN_ROOT)/linux-$(KERNEL_VERSION) && pwd)
+KERNEL_SRC ?= $(shell cd $(XEN_ROOT)/build-linux-$(KERNEL_VERSION)_$(XEN_TARGET_ARCH) && pwd)
 
 ifeq ($(KERNEL_SRC),)
 $(error Kernel source for kernel $(KERNEL_VERSION) not found)
@@ -40,10 +46,10 @@ endif
 # may not have the extraversion, e.g. linux-2.6.12-xen0 may contain release 2.6.12.6-xen0.
 KERNEL_RELEASE=$(shell make -s -C $(KERNEL_SRC) kernelrelease)
 
-KERNEL_MODULE_DIR=/lib/modules/$$(KERNEL_RELEASE)/kernel
+KERNEL_MODULE_DIR=/lib/modules/$(KERNEL_RELEASE)/kernel
 
 $(warning KERNEL_SRC           $(KERNEL_SRC))
 $(warning LINUX_VERSION                $(LINUX_VERSION))
 $(warning KERNEL_VERSION       $(KERNEL_VERSION))
 $(warning KERNEL_RELEASE       $(KERNEL_RELEASE))
-$(warning KERNEL_ MODULE_DIR   $(KERNEL_MODULE_DIR))
+$(warning KERNEL_MODULE_DIR    $(KERNEL_MODULE_DIR))
index 94c2f7569b4ef7773ba569a0034cd0fa36e3a6c9..aefbd43d432e1efb056be52bdb9a430e19edda20 100644 (file)
@@ -1530,12 +1530,7 @@ void varp_exit(void){
     dprintf("<\n");
 }
 
-#ifdef MODULE_PARM
-MODULE_PARM(varp_mcaddr, "s");
-MODULE_PARM(varp_device, "s");
-#else
 module_param(varp_mcaddr, charp, 0644);
 module_param(varp_device, charp, 0644);
-#endif
 MODULE_PARM_DESC(varp_mcaddr, "VARP multicast address");
 MODULE_PARM_DESC(varp_device, "VARP network device");
index 23855d5399e2c8e20f555c83acc57f0962cfd282..51796415cc59a9e03f8af738cadc0e3006dde1d4 100644 (file)
@@ -693,12 +693,7 @@ module_init(vnet_module_init);
 module_exit(vnet_module_exit);
 MODULE_LICENSE("GPL");
 
-#ifdef MODULE_PARM
-MODULE_PARM(vnet_encaps, "s");
-#else
 module_param(vnet_encaps, charp, 0644);
-#endif
-
 MODULE_PARM_DESC(vnet_encaps, "Vnet encapsulation: etherip or udp.");
 
 #endif
index 530284c218a75c4d734a3fcea3927e6b492fa44e..8486c0d8f048913aec19fa7a06a995e2b9b810a3 100644 (file)
@@ -16,7 +16,7 @@
 # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #----------------------------------------------------------------------------
 
-VNET_ROOT = $(shell cd .. && pwd)
+VNET_ROOT ?= $(shell cd .. && pwd)
 include $(VNET_ROOT)/Make.env
 
 .PHONY: all
@@ -27,6 +27,8 @@ all: vnetd
 # Comment out when outside xen.
 #include $(XEN_ROOT)/tools/Rules.mk
 
+INSTALL_PROG ?= $(INSTALL) -m0755 -p
+
 VNETD_INSTALL_DIR = /usr/sbin
 
 INCLUDES += -I$(LIBXUTIL_DIR)
index 995c0a8bfb265ea3ec0ac053e6e99594de81ac4a..7b358e92e24648c6137697ee6abd489059d0c0c0 100644 (file)
@@ -45,6 +45,7 @@
 #define module_exit(x)
 #define MODULE_LICENSE(x)
 #define MODULE_PARM(v, t)
+#define module_param(v, t, s)
 #define MODULE_PARM_DESC(v, s)
 
 enum {